package com.hyc.sec_oauth2atudy.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @projectName: sec_oauth2atudy
 * @package: com.hyc.sec_oauth2atudy.config
 * @className: OAuth2SecurityConfig
 * @author: 冷环渊 doomwatcher
 * @description: TODO
 * @date: 2022/4/30 21:28
 * @version: 1.0
 */
@Configuration
@Order(20)// 让执行顺序靠后 ，避免配置加载问题
public class OAuth2SecurityConfig extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.httpBasic().and().authorizeRequests().anyRequest().fullyAuthenticated();
    }
}
